package com.health.teahouse.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.health.common.annotation.Excel;
import com.health.common.core.domain.BaseEntity;

/**
 * 评论信息对象 comments
 * 
 * @author yang
 * @date 2024-02-11
 */
public class Comments extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 评论ID，自增主键 */
    private Long commentId;

    /** 评论用户ID */
    @Excel(name = "评论用户ID")
    private Long userId;
    private String userName;
    private String postTitle;
    /** 关联的帖子ID */
    @Excel(name = "关联的帖子ID")
    private Long postId;

    @Override
    public String toString() {
        return "Comments{" +
                "commentId=" + commentId +
                ", userId=" + userId +
                ", userName='" + userName + '\'' +
                ", postTitle='" + postTitle + '\'' +
                ", postId=" + postId +
                ", commentContent='" + commentContent + '\'' +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                '}';
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPostTitle() {
        return postTitle;
    }

    public void setPostTitle(String postTitle) {
        this.postTitle = postTitle;
    }

    /** 评论内容 */
    @Excel(name = "评论内容")
    private String commentContent;

    /** 评论创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "评论创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 评论更新时间 */
    private Date updatedAt;

    public void setCommentId(Long commentId) 
    {
        this.commentId = commentId;
    }

    public Long getCommentId() 
    {
        return commentId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setPostId(Long postId) 
    {
        this.postId = postId;
    }

    public Long getPostId() 
    {
        return postId;
    }
    public void setCommentContent(String commentContent) 
    {
        this.commentContent = commentContent;
    }

    public String getCommentContent() 
    {
        return commentContent;
    }
    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }
    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

}
